Open
Conversation
Intercepts `Cmd+=`/`Cmd+-`/`Cmd+0` via `before-input-event` before Chromium sees them, so the main process fully owns zoom. Using `zoom-changed` was unreliable — Chromium applies its own preset step on top, causing the actual zoom factor to exceed what the window was sized for and clipping content. The top of the chat window and the left btns were cropped at higher zoom levels. This was particularly evident with 'Full width' toggled on. **Changes:** - Added `applyZoom(zoom)` — resizes and repositions the window proportionally to the zoom factor, clamping the left edge to the screen boundary to prevent macOS from clipping panel windows that start off-screen - Updated `showWindow()` to read the current zoom factor and apply it when repositioning, so the window doesn't snap back to 1× on summon - Bumped `BAR_WIDTH` from 1040 → 1100 to give the renderer more horizontal breathing room at default zoom - Added `.zed` to `.gitignore so I could turn off 'format on save' and 'remove trailing whitespace' for this project else too many lines were changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intercepts
Cmd+=/Cmd+-/Cmd+0viabefore-input-eventbefore Chromium sees them, so the main process fully owns zoom. Usingzoom-changedwas unreliable — Chromium applies its own preset step on top, causing the actual zoom factor to exceed what the window was sized for and clipping content. The top of the chat window and the left btns were cropped at higher zoom levels. This was particularly evident with 'Full width' toggled on.Changes:
Added
applyZoom(zoom)— resizes and repositions the window proportionally to the zoom factor, clamping the left edge to the screen boundary to prevent macOS from clipping panel windows that start off-screenUpdated
showWindow()to read the current zoom factor and apply it when repositioning, so the window doesn't snap back to 1× on summonBumped
BAR_WIDTHfrom 1040 → 1100 to give the renderer more horizontal breathing room at default zoomAdded
.zedto `.gitignore so I could turn off 'format on save' and 'remove trailing whitespace' for this project else too many lines were changed